* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    margin: 0 auto;
}

h1 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #333;
}

.section {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section h2 {
    font-size: 1.1em;
    margin-bottom: 10px;
    color: #333;
}

.participant-item {
    display: inline-flex;
    align-items: center;
    padding: 8px;
    margin: 5px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.advanced-payments {
    display: flex;
    gap: 8px;
}

.advanced-payment {
    display: flex;
    align-items: center;
}

.advanced-payment label {
    font-size: 0.9em;
}

.advanced-payment input {
    width: 80px;
    padding: 2px 4px;
}

.time-slot {
    background-color: #f8f9fa;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.time-slot h3 {
    font-size: 1em;
    margin-bottom: 10px;
    color: #495057;
}

.fee-config {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.fee-config .input-group {
    flex: 1;
    display: flex;
    align-items: center;
}

.fee-config label {
    white-space: nowrap;
    margin-right: 5px;
}

.fee-config input {
    width: 80px;
}

.participants-row {
    display: flex;
    align-items: center;
    padding: 8px;
    background-color: #fff;
    border-radius: 4px;
    margin-top: 10px;
}

.participants-label {
    white-space: nowrap;
    margin-right: 10px;
    color: #495057;
}

.participants-config {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    overflow-x: auto;
    padding: 5px;
    flex: 1;
}

.participant-checkbox {
    display: flex;
    align-items: center;
    white-space: nowrap;
    margin-right: 10px;
    font-size: 0.9em;
}

.participant-checkbox input[type="checkbox"] {
    margin-right: 4px;
}

/* 隐藏滚动条但保持功能 */
.participants-config::-webkit-scrollbar {
    height: 4px;
}

.participants-config::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.participants-config::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.participants-config::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.result {
    margin-top: 15px;
}

.person-fee-detail {
    display: inline-block;
    padding: 10px;
    margin: 5px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9em;
}

.warning-message {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9em;
}

.warning-message p {
    margin: 5px 0;
}

.warning-message span {
    font-weight: bold;
}

input[type="text"], input[type="number"] {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

button:hover {
    background-color: #45a049;
}

.final-amount {
    font-weight: bold;
    margin-top: 10px !important;
}

.final-amount.positive {
    color: #dc3545;
}

.final-amount.negative {
    color: #28a745;
}

#totalFee, #perPersonFee {
    font-weight: bold;
    color: #4CAF50;
}
